<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 * 
 * INSERT INTO  `bbs`.`t_message` (
`id` ,
`username` ,
`sex` ,
`content` ,
`avater` ,
`time_at`
)
VALUES (
NULL ,  'gbgfng',  'gf',  'gnfnsnjshf',  'sfnhyd',  ''
);


 */


require_once './db_conn.php';
$conn;
$img = $_POST['img'];
$title = $_POST['title'];
$txt = $_POST['txt'];
$type = $_POST['type'];
$time = $_POST['time'];
$writer = $_POST['writer'];
$onclick = $_POST['onclick'];

$sql = "

	INSERT INTO `db_sente`.`tb_news` (
	`id`,
	`imgurl`,
	`pdate`,
	`typeid`,
	`title`, 
	`content`,
	`source`,
	`hits`,
	`isshow`
	)
	VALUES (
	NULL,  '$img',  '$time',  '$type',  '$title',  '$txt',  '$writer',  '$onclick',  '$isshow'
	);



  ";
$result = $conn->query($sql);
header("location:page.php");
 